
package dieci.hibernate;

import dieci.database.PersistentObject;
import dieci.system.OrderRawMaterialDetails;

/**
 *
 * @author DuckSys
 */
public class HibOrderRawMaterialDetails implements PersistentObject{

    private HibOrderRawMaterialDetailId id;
    private int amount;
    private double cost;

    public HibOrderRawMaterialDetails()
    {
    }

    public HibOrderRawMaterialDetails(OrderRawMaterialDetails details, Long orderRawMaterialId)
    {
        id = new HibOrderRawMaterialDetailId();
        id.setOrderRawMaterialId(orderRawMaterialId);
        id.setRawMaterialId(details.getRawMaterialId());
        this.amount = details.getAmount();
        this.cost = details.getCost();
    }

            /**
     * Get the value of cost
     *
     * @return the value of cost
     */
    public double getCost()
    {
        return cost;
    }

    /**
     * Set the value of cost
     *
     * @param cost new value of cost
     */
    public void setCost(double cost)
    {
        this.cost = cost;
    }

    
    /**
     * Get the value of amount
     *
     * @return the value of amount
     */
    public int getAmount()
    {
        return amount;
    }

    /**
     * Set the value of amount
     *
     * @param amount new value of amount
     */
    public void setAmount(int amount)
    {
        this.amount = amount;
    }

    /**
     * Get the value of details
     *
     * @return the value of details
     */
    public HibOrderRawMaterialDetailId getId()
    {
        return id;
    }

    /**
     * Set the value of details
     *
     * @param details new value of details
     */
    public void setId(HibOrderRawMaterialDetailId id)
    {
        this.id = id;
    }

}
